package com.share.user.controller;

import com.share.common.core.web.domain.AjaxResult;
import com.share.common.security.annotation.RequiresLogin;
import com.share.user.service.IUserInfoService;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import static com.share.common.core.web.domain.AjaxResult.success;

/**
 * @author zt181
 * @date 2025/7/6
 */

@RestController
@RequestMapping("/userInfo")
public class UserInfoApiController {

    @Autowired
    private IUserInfoService userInfoService;

    @Operation(summary = "是否免押金")
    @RequiresLogin
    @GetMapping("/isFreeDeposit")
    public AjaxResult isFreeDeposit() {
        return success(userInfoService.isFreeDeposit());
    }
}
